<!DOCTYPE html>
<html>
<head>
    {include file="../application/common/header.html" /}
</head>

<body>
	<div id="teacher_querytb">
        <form id="teacher_queryForm" class="m5">
            年级：
            <select class="form-control1" name="grade" id="grade"></select>
            学科：
            <select class="form-control1" name="subjectId" id="subjectId"></select>
            教师姓名：
            <input class="form-control1" type="text" name="teacherName" id="teacherName">
            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-search'" onclick="searchForm('teacher_query')">查询</a>
            <a class="easyui-linkbutton l-btn l-btn-small" data-options="iconCls:'icon-clear'" onclick="resetForm('teacher_query')">重置</a><br/>
        </form>
    </div>
    <table id="teacher_querydg">
        <thead>
            <tr>
                <th data-options="field:'ID',checkbox:false">ID</th>
                <th data-options="field:'姓名',title:'姓名',width:15"></th>
                <th data-options="field:'年级号',title:'年级名称',width:15,formatter:function(value,row,index){
                    return row.gradeName;
                }"></th>
                <th data-options="field:'任教学科ID',title:'学科名称',width:15,formatter:function(value,row,index){
                    return row.subjectName;
                }"></th>
                <th data-options="field:'手机号',title:'手机号',width:20"></th>
                <th data-options="field:'离校学期ID',title:'在校状态',width:50,sortable:true,formatter:function(value,row,index){
                    if(value > 0) {
                        var text = '';
                        if(value == 1) text = '调出';
                        else if(value == 2) text = '休假';
                        else if(value == 3) text = '离职';
                        return '<span style=\'color:red;\'>'+text+'</span>';
                    } else {
                        return '在校';
                    }
                }"></th>
            </tr>
        </thead>
    </table>
    <script type="text/javascript">
        $(function(){
            var url = "/teacher/teacher_query";
            initDatagridAdmin("teacher_query", url, 0, 0, 0, 0);
            initGrade("teacher_query");
            initSubject("teacher_query");
        })
    </script>
</body>
</html>